<html>
<head>
<link href="../style/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<p class="heading">
NumericDisplay element (used with <a href="interfacedoc.html">Interface</a> module)
</p>
<p class="subheading">
Description:
</p>
<p>
This element adds a numeric display to an interface. This is an object that can display
digits in various fonts, and is much faster and easier than re-writing layers with new
digits.
</p>
<p class="subheading">
To use:
</p>
<p>
The code for this element is included in the <a href="interfacedoc.html">interface module</a>, linked as follows:
</p>
<p class="jcode">
&lt;script language="Javascript" src="gamelib_interface.js"&gt;&lt;/script&gt;
</p>
<p>
You then instantiate a NumericDisplay object by adding the following to your script:
</p>

<p class="jcode">
myDisplay=new In_NumericDisplay(50,50,6,1);
</p>

<p>
The four arguments are x,y (position), number of digits, and finally the font face. There are
currently 10 faces, each on 2 transparent backgrounds. Faces 0-9 are aliased against black and
10-19 are aliased against white.
</p>

<p class="subheading">
List of methods for NumericDisplay
</p>

<p>
<a href="#getValue">getValue</a><br>
<a href="#reset">reset</a><br>
<a href="#setResetValue">setResetValue</a><br>
<a href="#setValue">setValue</a><br>
</p>

<p class="subheading">
Descriptions of methods for NumericDisplay
</p>

<table>
<tr>
<th>Method</th><th NOWRAP>Parameters</th><th>Description</th>
</tr>

<tr>
<a name="getValue">
<td>getValue</td><td>(none)</td><td>
Returns the current value displayed by the numericDisplay. If the display doesn't
have enough digits to display the number, this will still reflect the true value.
</td>
</tr>

<tr>
<a name="reset">
<td>reset</td><td>(none)</td><td>
Resets the numericDisplay to its current reset value (0 by default) You can change the
reset value using the <a href="#setResetValue">setResetValue</a> method.
</td>
</tr>

<tr>
<a name="setResetValue">
<td>setResetValue</td><td>Numeric</td><td>
Sets the reset value. When the <a href="#reset">reset</a> method is called,
the display will be set to this number.
</td>
</tr>

<tr>
<a name="setValue">
<td>setValue</td><td>Numeric</td><td>
Sets the value of the display. If the display does not have enough digits
to show the whole number, then it will display the last x digits. So if the
display had 3 digits, and you tried to display "1234", then the display would
show "234".
</td>
</tr>

</table>


</body>
</html>